/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.io.Serializable;
public class Trp_curso implements Serializable {
	public Trp_curso() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == orm.ORMConstants.KEY_TRP_CURSO_TRP_ALUMNO1) {
			return ORM_trp_alumno1;
		}
		
		return null;
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == orm.ORMConstants.KEY_TRP_CURSO_NIVEL_ID_NIVEL) {
			this.nivel_id_nivel = (orm.Trp_nivel) owner;
		}
		
		else if (key == orm.ORMConstants.KEY_TRP_CURSO_COLEGIO) {
			this.colegio = (orm.Trp_colegio) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private int cu_id;
	
	private String cu_curso;
	
	private orm.Trp_nivel nivel_id_nivel;
	
	private orm.Trp_colegio colegio;
	
	private java.util.Set ORM_trp_alumno1 = new java.util.HashSet();
	
	public void setCu_curso(String value) {
		this.cu_curso = value;
	}
	
	public String getCu_curso() {
		return cu_curso;
	}
	
	private void setCu_id(int value) {
		this.cu_id = value;
	}
	
	public int getCu_id() {
		return cu_id;
	}
	
	public int getORMID() {
		return getCu_id();
	}
	
	public void setNivel_id_nivel(orm.Trp_nivel value) {
		if (nivel_id_nivel != null) {
			nivel_id_nivel.trp_curso.remove(this);
		}
		if (value != null) {
			value.trp_curso.add(this);
		}
	}
	
	public orm.Trp_nivel getNivel_id_nivel() {
		return nivel_id_nivel;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Nivel_id_nivel(orm.Trp_nivel value) {
		this.nivel_id_nivel = value;
	}
	
	private orm.Trp_nivel getORM_Nivel_id_nivel() {
		return nivel_id_nivel;
	}
	
	public void setColegio(orm.Trp_colegio value) {
		if (colegio != null) {
			colegio.trp_curso.remove(this);
		}
		if (value != null) {
			value.trp_curso.add(this);
		}
	}
	
	public orm.Trp_colegio getColegio() {
		return colegio;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Colegio(orm.Trp_colegio value) {
		this.colegio = value;
	}
	
	private orm.Trp_colegio getORM_Colegio() {
		return colegio;
	}
	
	private void setORM_Trp_alumno1(java.util.Set value) {
		this.ORM_trp_alumno1 = value;
	}
	
	private java.util.Set getORM_Trp_alumno1() {
		return ORM_trp_alumno1;
	}
	
	public final orm.Trp_alumnoSetCollection trp_alumno1 = new orm.Trp_alumnoSetCollection(this, _ormAdapter, orm.ORMConstants.KEY_TRP_CURSO_TRP_ALUMNO1, orm.ORMConstants.KEY_TRP_ALUMNO_CURSO, orm.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getCu_id());
	}
	
}
